package com.wxp.demo06.application.room.entity;

import androidx.annotation.NonNull;
import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.PrimaryKey;

/**
 * 图书信息实体类
 */
@Entity(tableName = "book_info")
public class BookInfoEntity {

    /**
     * 数据id
     */
    @PrimaryKey(autoGenerate = true)
    @ColumnInfo(name = "id")
    private int id;
    /**
     * 书籍名称
     */
    @ColumnInfo(name = "name")
    private String name;
    /**
     * 作者
     */
    @ColumnInfo(name = "author")
    private String author;
    /**
     * 出版社
     */
    @ColumnInfo(name = "press")
    private String press;
    /**
     * 价格
     */
    @ColumnInfo(name = "price")
    private double price;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getPress() {
        return press;
    }

    public void setPress(String press) {
        this.press = press;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    @NonNull
    @Override
    public String toString() {
        return "BookInfo{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", author='" + author + '\'' +
                ", press='" + press + '\'' +
                ", price=" + price +
                '}';
    }
}
